<template>
  <div>
    <div class="list-moreImg">
      <p @click="toDetail">{{title}}</p>
      <div class="content-imgs" @click="toDetail">
        <img class="list-oneimg" :src="$fixImgUrl(imgs[0].url)">
        <div>
          <i class="iconfont iconshipin"></i>
        </div>
      </div>
      <div class="left-news">
        <span>{{author}}</span>
        <i>52<span>跟帖</span></i>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {

    }
  },
  props: ['title', 'imgs', 'author', 'id'],
  methods: {
    toDetail() {
      this.$router.push({
        name: 'newsDetail',
        params: {
          id: this.id
        }
      })
    }
  }
}
</script>

<style scoped>
.list-moreImg {
  padding: 4vw 2.5vw 4vw 4vw;
  border-bottom: 1px solid #e4e4e4;
}
.list-moreImg p {
  display: flex;
  font-size: 4.1vw;
  color: #333333;
  line-height: 6vw;
  height: 12vw;
  cursor: pointer;
}
.content-imgs {
  position: relative;
  width: 100%;
  margin-top: 3vw;
  margin-bottom: 3vw;
  cursor: pointer;
}
.content-imgs img {
  margin-right: 1px;
  object-fit: cover;
}
.content-imgs div {
  position: absolute;
  top: 50%;
  margin-top: -10vw;
  left: 50%;
  margin-left: -10vw;
  width: 20vw;
  height: 20vw;
  background: #aaa;
  border-radius: 50%;
}
.content-imgs .iconshipin {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18vw;
  color: white;
  /* background: #666; */
}
</style>
